//
//  ThirdCollectionViewCell.m
//  味·道
//
//  Created by 刘孝纯 on 15/7/1.
//  Copyright (c) 2015年 WMR. All rights reserved.
//

#import "ThirdCollectionViewCell.h"
#import "MaocHeader.h"
#import <UIImageView+WebCache.h>
@implementation ThirdCollectionViewCell
-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        _imageview = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0,(SCREEN_WIDTH-30)/2 , 80)];
        _title = [[UILabel alloc] initWithFrame:CGRectMake(0, 90, (SCREEN_WIDTH-30)/2, 10)];
        _title.font = [UIFont systemFontOfSize:10];
        _title.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_imageview];
        [self.contentView addSubview:_title];
    }
    return self;
}
-(void)setModel:(Recommend2Model *)model
{
    if (_model != model) {
        [_model release];
        _model = [model retain];
    }
    [_imageview sd_setImageWithURL:[NSURL URLWithString:model.thumb] placeholderImage:[UIImage imageNamed:@"placeholder"]];
    _title.text = model.title;
}
@end
